﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Script.Serialization;

namespace MvcPractice.Controllers
{
    public class NewController : Controller
    {
        // GET: New
        //public ActionResult Index(string year, string month, string day, string id)
        //{
            //return Redirect("Home/Index");//跳转URl
            //return RedirectToAction("");//跳转Action
            //return RedirectToRoute("defaults" ,new { controller = "Home", action = "Index"});//根据路由

            //var obj = new { Year = year, Month = month, Day = day, Id = id };
            //return Json(obj, JsonRequestBehavior.AllowGet);//返回Json格式数据
        //}
        /// <summary>
        /// 返回一个视图,里面有参数的话返回new里的页面
        /// </summary>
        /// <returns></returns>
        public ViewResult Index()
        {
            return View();
        }
    }
}